<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Administrative Tools</title>
    <meta name="author" content="Joey Freeland" />
    <link rel="stylesheet" type="text/css" href="/css/generic.css" />
  </head>
  <body>
    <div>
      {% if resultsdeleted %}
        Deleted all entries before date specified in script.
        <br />
      {% else %}
        Delete entries dated before today?
        <form action="/lumberg/deleteresults">
          <input type="submit">
        </form>
      {% endif %}
    </div>
    <br />
    <div>
      {% if deviceupdated and old_location and new_location %}
        Updated {{ old_location }} to {{ new_location }}
        <br />
      {% endif %}
      Update a device association:
      <br />
      <form action="/lumberg/updatedevice">
        Old Location (device ID): <input type="text" name="old_location">
        <br />
        New Location (device ID): <input type="text" name="new_location">
        <br />
        New Provider: <input type="text" name="new_provider">
        <br />
        <input type="submit">
      </form>
    </div>
    <br />
    <div>
      {% if devicedeleted and deleteddevice %}
        Deleted device: {{ deleteddevice }}
        <br />
      {% endif %}
      Delete a device and the results associated with it:
      <form action="/lumberg/deletedevice">
        Location (device ID): <input type="text" name="location">
        <br />
        <input type="submit">
      </form>
    </div>
    <div>
      {% if tslr and location and provider %}
        Added time_since_last_result for {{ count }} results for device
        {{ location }} at {{ provider }}.
        <br />
      {% endif %}
      Add the time_since_last_result for a device:
      <form action="/lumberg/addtslr">
        Location (device ID): <input type="text" name="location">
        <br />
        Provider: <input type="text" name="provider">
        <br />
        SSID: <input type="text" name="ssid">
        <br />
        <input type="submit">
      </form>
    </div>
  </body>
</html>
